<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <script src="../js/vue.js"></script>
        <style>
            
        </style>
    </head>
    <body>
        <div id="app" v-bind:style="{ background:black ,height:height }">
            <button v-on:click="isShow = !isShow">显示/隐藏</button>
            <div v-if="isShow" style="background-color:lightyellow ; color:red;">v-if指令</div>
            <div v-show="isShow" style="background-color:lightskyblue ; color:green;">v-show指令</div>
            <div v-if="isShow" style="background-color:lightyellow ; color:red;">v-if指令</div>
            <div v-show="isShow" style="background-color:lightskyblue ; color:green;">v-show指令</div>
            <div v-if="isShow" style="background-color:lightyellow ; color:red;">v-if指令</div>
            <div v-show="isShow" style="background-color:lightskyblue ; color:green;">v-show指令</div>
            <div v-if="isShow" style="background-color:lightyellow ; color:red;">v-if指令</div>
            <div v-show="isShow" style="background-color:lightskyblue ; color:green;">v-show指令</div>

            <div v-show="!isShow" style="background-color:lightskyblue ; color:green;">v-show指令</div>
            <div v-if="!isShow" style="background-color:lightyellow ; color:red;">v-if指令</div>
            <div v-show="!isShow" style="background-color:lightskyblue ; color:green;">v-show指令</div>
            <div v-if="!isShow" style="background-color:lightyellow ; color:red;">v-if指令</div>
            <div v-show="!isShow" style="background-color:lightskyblue ; color:green;">v-show指令</div>
            <div v-if="!isShow" style="background-color:lightyellow ; color:red;">v-if指令</div>
            <div v-show="!isShow" style="background-color:lightskyblue ; color:green;">v-show指令</div>
            <div v-if="!isShow" style="background-color:lightyellow ; color:red;">v-if指令</div>
        </div>
        <script>
            var vm = new Vue({
                el:'#app',
                data:{
                    isShow : true,
                    black : 'black',
                    height : '214px'
                }
            })
        </script>
    </body>
</html>